<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主页</title>
    <script src="./js/jquery.min.js"></script>
</head>

<body>
    <h1 onclick="addRead()">点我有惊喜</h1>
</body>

<script>
    //点击增加阅读量
    function addRead() {
        jQuery.ajax({
            type: "POST",
            url: "/user/add_read",
            data: {},
            success: function (data) {
                if (data == 1) {
                    alert("阅读量增加成功!");
                } else {
                    alert("阅读量增加失败");
                }
            }
        });
    }
</script>

</html>